#include <cstdio>
#include <iostream>
using namespace std;

// #include "Person.hpp"
#include "FamilyTree.hpp"

class FamilyTreeManager
{
};

void inputProfile()
{
    string name, job, dob, dod;
    int gender, fatherId, motherId;
    
    cout << "姓名：";
    cin >> name;
    
    cout << "性别(0/♀，1/♂)：";
    cin >> gender;
    
    cout << "生于(yyyy-mm-dd)：";
    cin >> dob;
    Date birthday(dob);
    
    cout << "逝于(yyyy-mm-dd)：";
    cin >> dod;
    Date deathday(dod);
    
    cout << "职业：";
    cin >> job;
    
    cout << "父亲：";
    cin >> fatherId;
    
    cout << "母亲：";
    cin >> motherId;
    
    Person *pFather = nullptr;
    Person *pMother = nullptr;
    
    Person p(name, gender, birthday, deathday, job, nullptr, nullptr);
    
}

void mainMenu()
{
    cout << "请选择功能：" << endl;
    cout << "1) 录入 录入家庭成员信息" << endl;
    cout << "2) 修改 修改成员信息" << endl;
    cout << "3) 删除 级联删除成员信息" << endl;
    cout << "4) 输出 将家谱以较友好的格式输出" << endl;
    cout << "5) 查询 按基本信息查询成员" << endl;
    cout << "6) 统计 统计并显示结果" << endl;
    cout << "a) 导入 把用户信息从文件读入程序" << endl;
    cout << "b) 导出 把用户信息导出到文件中保存" << endl;
    char func;
    cin >> func;
    switch (func)
    {
    case '1':
        inputProfile();
        break;
    case '2':
        break;
    case '3':
        break;
    case '4':
        break;
    case '5':
        break;
    case '6':
        break;
    case 'a':
        break;
    case 'b':
        break;
    default:
        break;
    }
}

int main(int argc, char **argv)
{
    mainMenu();
    return 0;
}
